import java.util.Scanner;
public class Loop_6 {
    public static void main(String[] args){
        Scanner reader = new Scanner(System.in);
        System.out.println("请输入10件商品的价格：");
        double[] price = new double[10];
        for(int i = 0;i < 10;i++){
            price[i] = reader.nextDouble();
        }
        double sum = 0;
        for(int i = 0;i < 10;i++){
            System.out.printf("第%d件商品%.2f元。\n",i+1,price[i]);
            sum += price[i];
        }
        System.out.printf("总金额为%.2f元。",sum);
    }
}

